/*
 *  PAGE-POST
 *  Blog post pages
 *
 *  TODO: Sort mess with multiple selectors about line 90 (.title, .excerpt, .meta etc)
 */

.page-post,
.page-case-study {
  $category-tag-height: $category-tag-height;

  .hero-image {
    position: relative;
    height: 300px;
  }

  .wp-caption-text {
    font-size: 15px;
  }

  .social-media-sharing {
    &.side {
      position: absolute;
      right: 0;
      display: none;
    }

    &.bottom {
      position: relative;
      left: 50%;
      display: inline-block;
      margin: 5px 0 35px;
      transform: translateX(-50%);

      .channel {
        display: inline-block;
        margin-right: 12px;

        &:last-child {
          margin-right: 0;
        }
      }
    }
  }

  h2 {
    @extend .h3;
  }

  .content-container {
    position: relative;
    margin: 0 auto;
    padding: 40px 0;
    background: $offWhite;

    ul,
    ol {
      line-height: 1.5;
      li {
        margin-bottom: 10px;
      }
    }
    ul {
      list-style: square;

      &.social-media-sharing {
        list-style: none;
      }
    }
    .title,
    .excerpt,
    .meta,
    .rule,
    .content,
    .author {
      margin: 30px auto;
      max-width: 796px;
    }
    .title,
    .excerpt,
    .meta,
    .rule,
    .author {
      text-align: center;
    }

    .category-tag {
      position: absolute;
      top: - $category-tag-height * .5;
      left: 50%;
      transform: translateX(-50%);
    }

    .title {
      margin-bottom: $title-border-bottom;
      padding: 0 15px;
    }
    .excerpt {
      max-width: 450px;
      font-size: 30px;
      font-family: $PxGroteskBold;

      p {
        margin-top: 10px;
      }
    }
    .meta {
      margin: 10px auto 20px;
      font-size: 18px;
      color: $darkGrey;

      .date {
        color: #969696;
      }
    }
    .rule {
      width: 184px;
      border-bottom: 4px solid;
      border-top: none;
      border-left: none;
      border-right: none;

    }
    .author {
      margin: 0 auto;
      padding: 0 6.25%;

      .mugshot {
        width: 90px;
        height: 90px;
        border-radius: 45px;
      }
      .title {
        margin-bottom: 20px;
        font-family: $PxGroteskBold;
        font-size: 20px;
      }
      .links {
        margin: 30px 0;
        padding: 0;
        list-style: none;

        .link a {
          border-bottom: 2px solid;
          font-family: $PxGroteskBold;
        }
      }
    }

  }

  .single-column {
    padding-top: $vertical-spacing * .5;
    padding-bottom: $vertical-spacing * .5;

    h3 {
      padding-bottom: 20px;
      line-height: 30px;
      text-transform: inherit;
      font-family: $PxGroteskBold;
    }

    .title {
      color: $nonBlack;
    }

    .content {
      a {
        border-bottom-width: 2px;
        border-bottom-style: solid;
        font-family: $PxGroteskBold;
      }
      video,
      img,
      iframe {
        max-width: 100%;
      }
      video,
      img {
        height: auto;
      }
    }

    & + .single-column {
      padding-top: 0;
    }
  }

  iframe {
    width: 100%;
  }

  [id*="attachment_"] {
    width: 100% !important;
  }

  ol {
    li {
      padding: 8px 0;
    }
  }

  @media screen and (min-width: $bp-medium) {
    .hero-image {
      height: 450px;
    }

    .single-column {
      padding-top: $vertical-spacing-medium * .5;
      padding-bottom: $vertical-spacing-medium * .5;

      .title {
        padding: 0 30px;
      }
    }

    .social-media-sharing {
      &.side {
        display: block;
      }
      &.bottom {
        margin: 20px 0 60px;

        .channel {
          margin-right: 17px;
        }
      }
    }

    .content-container {
      margin-top: -70px;
      margin-left: 80px;
      margin-right: 80px;
    }
  }

  @media screen and (min-width: $bp-large) {
    .single-column {
      padding-top: $vertical-spacing-large * .5;
      padding-bottom: $vertical-spacing-large * .5;
    }
  }

  @media screen and (min-width: $bp-huge) {
    .hero-image {
      height: 620px;
    }

    .content-container {
      max-width: $post-max-width;
      margin-top: -100px;
      margin-left: auto;
      margin-right: auto;
    }

    .content-container ul.social-media-sharing {
      right: 80px;
    }
  }
}
